<?php
	require_once 'Testing/Selenium.php';
	require_once 'PHPUnit/Framework/TestCase.php';
	require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
	require_once 'library/Excel/reader.php';
	require_once 'library/common.inc.php';
	require_once 'Application/applicationController.php';

	class mainTestController extends PHPUnit_Framework_TestCase
	{
		public $browser;
		public $optList;
		public $appObj;

		public function setUp()
		{
			$this->browser = new Testing_Selenium("*googlechrome", "http://url");
			$this->browser->start();
			$this->browser->windowMaximize();  // make browser window full screen
			$this->browser->open("http://url");
			$this->optList = readExcel();
		}

		/*
		public function tearDown()
		{
			$this->browser->stop();
		}
		*/

		public function testExecute()
		{
			if(count($this->optList)) {
				//call application
				//pass optList to application
				$this->appObj = new applicationController($this->browser,$this->optList );
				$this->appObj->execute();
				// call form control
			} else {
				// no operation in excel sheet
				print("empty excel sheet");
			}
		}

	}
?>